package cn.itcast;

import cn.itcast.annotation.EnableUserBean;
import cn.itcast.bean.User;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * 通过在类上声明@EnableUserBean，会自动的加载所有对象
 */
@EnableUserBean
public class TestApplication {

	public static void main(String[] args) {
		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(TestApplication.class);
		User user = applicationContext.getBean(User.class);
		System.out.println(user);
	}
}
